Facts or globals may be assigned values at initialization by including assignments in the rule base. If you include assignments, they must follow the global and fact declarations. Assignments are made as follows:
assignments := { PUT operand INTO target }
where "operand" is the value to assign to the target and "target" is the target of the assignment.
Targets may be facts or globals. If they are facts, they must be preceded by the keyword FACT. If they are globals they must have been declared in the global section of the rule base.
You may declare as many assignments as needed. The following examples illustrate assignments:
global xyz, abc, -- declare globals that will be used
global_1, global_2,
global_3, global_4,
global_5
put def into fact f1 -- put string "def" into fact "f1"
put "def" into xyz -- put string "def" into global "xyz"
put true into fact f2 -- put "TRUE" into fact "f2"
put 10.5 into fact "pg cnt" -- put 10.5 into fact "pg cnt"
put xyz into fact "nu fact" -- put the value of global "xyz" into
-- fact "nu fact"
-- ("nu fact" will contain "def")
put 11 into abc -- put 11 into global abc
put "a string" into fact f3 -- put string "a string" into fact f3
put fact f3 into fact f4 -- put the value of fact "f3" into
-- fact "f4"
-- ("f4" will contain "a string")
put ? into fact f5 -- set fact f5 unknown
put "?" into fact f6 -- set fact f6 unknown
put * into fact f7 -- set fact f7 to don't care
put "*" into fact f8 -- set fact f8 to don't care
put "" into fact f9 -- set fact f9 to "not asserted" (retract
-- the fact)
put "?" into global_1 -- put string "?" into global_1
put ? into global_2 -- put string "?" into global_2
put "*" into global_3 -- put string "*" into global_3
put * into global_4 -- put string "*" into global_4
put "" into global_5 -- put null string into global_5
Assignments in the assignment section are made during initialization of the system. Initialization occurs when you execute the "initXrules" XCMD.
NOTE: Assignments made within the assignment section of the rule base are
static. They will not cause the system to execute daemons. Additionally,
when forward chaining, the inference engine will not examine rules as a